/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.creational.factorymethod;

import com.behavioral.command.Command;
import com.structural.facade.EnumServer;
import com.behavioral.command.Server;
import com.structural.facade.EnumAccion;

import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author jmg
 */
public class Main {
    
    public static void main(String[] args) {
        
        try {
            
          Factory<Server,EnumServer> concreteFactory = new ConcreteFactory("factorymethod.conf");
          
          Server s = concreteFactory.createObject(EnumServer.ServerFTP);
          
          s.conectar();
          
          
          
          
            
            
        } catch (ClassNotFoundException ex) {
            Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
        }
        
        
        
    }
  
}
